home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
IRIX Base Documentation 1998 November
/
IRIX 6.5.2 Base Documentation November 1998.img
/
usr
/
share
/
catman
/
u_man
/
cat1
/
bg.z
/
bg
Wrap
Text File
|
1998-10-30
|
4KB
|
133 lines
bbbbgggg((((1111)))) bbbbgggg((((1111))))
NNNNAAAAMMMMEEEE
bbbbgggg - run jobs in the background
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
bbbbgggg [jjjjoooobbbb____iiiidddd ...]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
If job control is enabled (see the description of sssseeeetttt ----mmmm in the sssshhhh((((1111))))
manpage), the bbbbgggg utility resumes suspended jobs from the current
environment by running them as background jobs. If the job specified by
jjjjoooobbbb____iiiidddd is already a running background job, the bbbbgggg utility has no effect
and will exit successfully.
Using bbbbgggg to place a job into the background causes its process ID to
become "known in the current shell execution environment", as if it had
been started as an asynchronous list.
OOOOPPPPEEEERRRRAAAANNNNDDDDSSSS
The following operand is supported:
jjjjoooobbbb____iiiidddd Specify the job to be resumed as a background job. If no jjjjoooobbbb____iiiidddd
operand is given, the most recently suspended job is used. The
format of jjjjoooobbbb____iiiidddd is described in the entry for job control job
ID in the ((((sssshhhh)))) manpage.
SSSSTTTTDDDDOOOOUUUUTTTT
The output of bbbbgggg consists of a line in the format:
"[%d] %s\n", <job-number>, <command>
where the fields are as follows:
<job-number> A number that can be used to identify the job to the
wwwwaaaaiiiitttt, ffffgggg and kkkkiiiillllllll utilities. Using these utilities, the
job can be identified by prefixing the job number with
"%".
<command> The associated command that was given to the shell.
EEEEXXXXIIIITTTT SSSSTTTTAAAATTTTUUUUSSSS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
CCCCOOOONNNNSSSSEEEEQQQQUUUUEEEENNNNCCCCEEEESSSS OOOOFFFF EEEERRRRRRRROOOORRRRSSSS
If job control is disabled, the bbbbgggg utility will exit with an error and no
job will be placed in the background.
PPPPaaaaggggeeee 1111
bbbbgggg((((1111)))) bbbbgggg((((1111))))
AAAAPPPPPPPPLLLLIIIICCCCAAAATTTTIIIIOOOONNNN UUUUSSSSAAAAGGGGEEEE
A job is generally suspended by typing the SUSP character (<control>Z).
At that point, bbbbgggg can put the job into the background. This is most
effective when the job is expecting no terminal input and its output has
been redirected to non-terminal files. A background job can be forced to
stop when it has terminal output by issuing the command:
stty tostop
A background job can be stopped with the command:
kill -s stop job ID
The bbbbgggg utility will not work as expected when it is operating in its own
utility execution environment because that environment will have no
suspended jobs. In the following examples:
... | xargs bg
(bg)
each bbbbgggg operates in a different environment and will not share its parent
shell's understanding of jobs. For this reason, bbbbgggg is generally
implemented as a shell regular built-in.
SSSSEEEEEEEE AAAALLLLSSSSOOOO
ffffgggg((((1111)))),,,, kkkkiiiillllllll((((1111)))),,,, jjjjoooobbbbssss((((1111)))),,,, sssshhhh((((1111)))),,,, wwwwaaaaiiiitttt((((1111))))....
PPPPaaaaggggeeee 2222